package com.yuanfeng.userms.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuanfeng.userms.entity.UserBusinessEmployeeEntity;
import com.yuanfeng.userms.mapper.UserBusinessEmployeeMapper;
import com.yuanfeng.userms.service.UserBusinessEmployeeService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.stream.Collectors;

/**
 *
 */
@Service
public class UserBusinessEmployeeServiceImpl extends ServiceImpl<UserBusinessEmployeeMapper, UserBusinessEmployeeEntity>
    implements UserBusinessEmployeeService{

    @Override
    public List<String> queryEmployeesList(String businessId) {
        List<String> entityList=this.baseMapper.selectList(new LambdaQueryWrapper<UserBusinessEmployeeEntity>()
                                                    .eq(UserBusinessEmployeeEntity::getBusinessId,businessId))
                                .stream().map(UserBusinessEmployeeEntity::getUserId).collect(Collectors.toList());
        return entityList;
    }
}




